package indi.luckly.utils;

import java.util.Random;

/**
 * MD5盐工具类
 */
public class CreateUserUtils {
    private final static char[] chars = "0123456789".toCharArray();

    public static String CreateUserNumber(int n) {

        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < n; i++) {
            char c = chars[new Random().nextInt(chars.length)];
            if (i == 0 && c == '0') {//排除第一位0的情况
                --i;
                continue;
            }
            stringBuilder.append(c);
        }
        return stringBuilder.toString();
    }
}
